ifneq ($(KERNELRELEASE),)


obj-m += mt7601u.o

mt7601u-objs = \
	usb.o init.o main.o \
	mcu.o trace.o dma.o \
	core.o eeprom.o phy.o \
	mac.o util.o debugfs.o \
	tx.o


EXTRA_CFLAGS += -D__CHECK_ENDIAN__
CFLAGS_trace.o := -I$(src)

else


KDIR := /home/lenver/work/linux-dev-31452/hd-dev/build-dir/kernel
# KDIR := /home/lenver/work/android-6.0.1_r22/kernel_imx

all:
	$(MAKE) -C $(KDIR) M=$(PWD) modules
	# $(MAKE) -C $(KDIR) M=$(PWD) ARCH=arm CROSS_COMPILE=arm-linux-androideabi- modules LD=arm-linux-androideabi-ld.bfd KCFLAGS=-mno-android
clean:
	$(MAKE) -C $(KDIR) M=$(PWD) clean

endif
